﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PartsDebtBalanceView.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.PartsModel.PartsDebtBalanceView" %>
<%--冲帐记录--%>
<script>
    function AddAdjusting(BID,CID,DEBTID)
    {
        if (CID == 0)
        {
            alert("非正常冲款，无法进行调帐.")
            return;
        }
        top.$.pdialog.closeCurrent();
        //var DebtId = row.DebtId;
        var rel = "PartsBalanceAddAdjusting";
        var url = "PartsModel/PartsBalanceAddAdjusting.aspx?BID=" + BID;
        var title = "调帐处理...";
        var options = { width: 450, height: 250, max: false, mask: true, maxable: false, minable: false, fresh: true, resizable: false, drawable: true };
        top.$.pdialog.open(url, rel, title, options);
      //  top.navTab.openTab(rel, url, { title: title, fresh: true, external: false });
       
    }
</script>
<div class="pageContent">
	<form method="post" action="PartsModel/PartsDebtBalanceView.aspx" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
		<div class="pageFormContent" layoutH="58">
            
              <h2 style=" padding:0px 0px 5px 6px; border-bottom:1px solid #B8D0D6;">冲帐记录列表(绿色表示可进行调帐)</h2>
              <table class="table" width="100%">
                    <thead>
                        <tr>
                            <th>收款日期</th>
                            <th>款项类型</th>
                            <th>金额</th>
                            <th>备注</th>
                            <th>记帐日期</th>
                            <th>冲帐金额</th>
                            <th>操作人员</th>                          
                            <th>冲帐备注说明</th>    
                                               
                        </tr>
                    </thead>
                    <tbody>                       
                    <asp:repeater id="rpView" runat="server">
                        <HeaderTemplate> 
                        </HeaderTemplate>
                        <ItemTemplate> 
                            <tr>                               
                                <td><%# Eval("ShoukuanRiQi") is DBNull?"":Convert.ToDateTime( Eval("ShoukuanRiQi")).ToString("yyyy-MM-dd")%></td>
                                <td><%# Eval("KuanXiangLeiXing")%></td>
                                <td><%# Eval("JinE")%></td>
                                <td><%# Eval("CRemark")%></td>
                                <td><%# Convert.ToDateTime(Eval("CreateDate")).ToString("yyyy-MM-dd")%></td>
                                <td style="background-color:<%# Convert.ToInt32( Eval("Cid"))>0?"aquamarine":"darkgray" %>" ><a href="#" onclick="AddAdjusting(<%# Eval("BId") %>,<%# Eval("Cid") %>,<%# Eval("DebtId") %>)"> <%# Eval("BalanceMoney")%></a></td>
                                <td><%# Eval("RealName")%></td>                               
                                <td><%# Eval("Remark")%></td>
                            
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>  
                        </FooterTemplate>
                    </asp:repeater>
                    </tbody>
                </table>
               

        </div>
		<div class="formBar">
			<ul>
				
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">关闭</button></div></div></li>
			</ul>
		</div>
	</form>
	
</div>
